<html>
<head>
<title>Appendix C. Frequently Asked Questions</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">HTML_Progress</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
  		  [ <a href="../classtrees_HTML_Progress.html" class="menu">class tree: HTML_Progress</a> ]
		  [ <a href="../elementindex_HTML_Progress.html" class="menu">index: HTML_Progress</a> ]
		  [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10%" align="left" valign="bottom"><a href=
"../HTML_Progress/tutorial_B_migration12.pkg.html">Prev</a></td>
<td width="80%" align="center" valign="bottom"></td>
<td width="10%" align="right" valign="bottom"><a href=
"../HTML_Progress/tutorial_progress.constants.pkg.html">Next</a></td>
</tr>
</table>
<div><a name=""></a><div class="ref-title-box"><div class="ref-title">Appendix C. Frequently Asked Questions</div></div>

 <h1 align="center">Table of Contents</h1>
<ul>

&nbsp;&nbsp;&nbsp;<a href="../HTML_Progress/tutorial_C_faq.pkg.html#faq001">I got only 0% displayed on left corner of my browser screen</a><br />

&nbsp;&nbsp;&nbsp;<a href="../HTML_Progress/tutorial_C_faq.pkg.html#faq002">The progress bar is running, but i see no changes</a><br />

&nbsp;&nbsp;&nbsp;<a href="../HTML_Progress/tutorial_C_faq.pkg.html#faq003">The progress meter seems to be frozen at 100%, i see no changes</a><br />
</ul>

 
 <a name="faq001"></a><h3 class="title">I got only 0% displayed on left corner of my browser screen</h3><p>You've forgot to put the necessary styles (CSS) on your HTML document. 
    Adds the HTML_Progress::getStyle or <a href="../HTML_Progress/tutorial_ui.getstyle.pkg.html">HTML_Progress_UI::getStyle</a> method 
     between style-html-tags, and your code look like:<br />
    <p><div class="listing"><pre><ol><li><span class="src-php">&lt;?php</span></li>
<li><span class="src-inc">require_once </span><span class="src-str">'HTML/Progress.php'</span><span class="src-sym">;</span></li>
<li><span class="src-var">$bar </span>= <span class="src-key">new </span><span class="src-id"><a href="../HTML_Progress/HTML_Progress.html">HTML_Progress</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-php">?&gt;</span></li>
<li>&lt;style type=&quot;text/css&quot;&gt;</li>
<li>&lt;!--</li>
<li><span class="src-php">&lt;?php </span>echo <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><a href="../HTML_Progress/Progress_UI/HTML_Progress_UI.html#methodgetStyle">getStyle</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-php">?&gt;</span></li>
<li>// --&gt;</li>
<li>&lt;/style&gt;</li>
<li><span class="src-php">&lt;?php</span></li>
<li>echo <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">toHtml</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">; </span></li>
<li><span class="src-php">?&gt;</span></li>
</ol></pre></div></p>
    You should see a progress bar like that :
     <p><table class="note"><tr><td><img src="../media/example.png"></td><td><img src = "../media/screenshots/scratch1.png"/></td></tr></table></p><br /></p><hr />

 <a name="faq002"></a><h3 class="title">The progress bar is running, but i see no changes</h3><p>You've forgot to put the requires JavaScript code to manage the progress bar.
    Adds the HTML_Progress::getScript or <a href="../HTML_Progress/tutorial_ui.getscript.pkg.html">HTML_Progress_UI::getScript</a> method 
     between script-html-tags, and your code up and running look like:<br />
    <p><div class="listing"><pre><ol><li><span class="src-php">&lt;?php</span></li>
<li><span class="src-inc">require_once </span><span class="src-str">'HTML/Progress.php'</span><span class="src-sym">;</span></li>
<li><span class="src-var">$bar </span>= <span class="src-key">new </span><span class="src-id"><a href="../HTML_Progress/HTML_Progress.html">HTML_Progress</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-php">?&gt;</span></li>
<li>&lt;style type=&quot;text/css&quot;&gt;</li>
<li>&lt;!--</li>
<li><span class="src-php">&lt;?php </span>echo <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><a href="../HTML_Progress/Progress_UI/HTML_Progress_UI.html#methodgetStyle">getStyle</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-php">?&gt;</span></li>
<li>// --&gt;</li>
<li>&lt;/style&gt;</li>
<li>&lt;script type=&quot;text/javascript&quot;&gt;</li>
<li>&lt;!--</li>
<li><span class="src-php">&lt;?php </span>echo <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><a href="../HTML_Progress/Progress_UI/HTML_Progress_UI.html#methodgetScript">getScript</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-php">?&gt;</span></li>
<li>//--&gt;</li>
<li>&lt;/script&gt;</li>
<li>&nbsp;</li>
<li><span class="src-php">&lt;?php</span></li>
<li>echo <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">toHtml</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">; </span></li>
<li>&nbsp;</li>
<li>do <span class="src-sym">{</span></li>
<li>    <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">display</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">getPercentComplete</span><span class="src-sym">(</span><span class="src-sym">) </span>== <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li>        <span class="src-key">break</span><span class="src-sym">; </span><span class="src-comm">// the progress bar has reached 100%</span></li>
<li>    <span class="src-sym">}</span></li>
<li>    <a href="http://www.php.net/sleep">sleep</a><span class="src-sym">(</span><span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;  </span><span class="src-comm">// to replace by your own procedure</span></li>
<li>    <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">incValue</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-sym">} </span><span class="src-key">while</span><span class="src-sym">(</span><span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-php">?&gt;</span></li>
</ol></pre></div></p></p><hr />

 <a name="faq003"></a><h3 class="title">The progress meter seems to be frozen at 100%, i see no changes</h3><p>Using <a href="../HTML_Progress/tutorial_progress.run.pkg.html">HTML_Progress::run</a> rather than coding a loop as in above example,
    you've forgot to give a delay to progress animation.
    Because it's not necessary in real world, almost all cases, the delay is fixed at zero (default behaviour).
     Uses the <a href="../HTML_Progress/tutorial_progress.setanimspeed.pkg.html">HTML_Progress::setAnimSpeed</a> method to fix the delay from 1 to 1000 milliseconds.
     In example below delay is only 0.5 seconds<br />
    <p><div class="listing"><pre><ol><li><span class="src-php">&lt;?php</span></li>
<li><span class="src-inc">require_once </span><span class="src-str">'HTML/Progress.php'</span><span class="src-sym">;</span></li>
<li><span class="src-var">$bar </span>= <span class="src-key">new </span><span class="src-id"><a href="../HTML_Progress/HTML_Progress.html">HTML_Progress</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">setAnimSpeed</span><span class="src-sym">(</span><span class="src-num">500</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-php">?&gt;</span></li>
<li>&lt;style type=&quot;text/css&quot;&gt;</li>
<li>&lt;!--</li>
<li><span class="src-php">&lt;?php </span>echo <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><a href="../HTML_Progress/Progress_UI/HTML_Progress_UI.html#methodgetStyle">getStyle</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-php">?&gt;</span></li>
<li>// --&gt;</li>
<li>&lt;/style&gt;</li>
<li>&lt;script type=&quot;text/javascript&quot;&gt;</li>
<li>&lt;!--</li>
<li><span class="src-php">&lt;?php </span>echo <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><a href="../HTML_Progress/Progress_UI/HTML_Progress_UI.html#methodgetScript">getScript</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-php">?&gt;</span></li>
<li>//--&gt;</li>
<li>&lt;/script&gt;</li>
<li>&nbsp;</li>
<li><span class="src-php">&lt;?php</span></li>
<li>echo <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">toHtml</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">; </span></li>
<li><span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">run</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-php">?&gt;</span></li>
</ol></pre></div></p></p><hr /></div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="33%" align="left" valign="top"><a href="../HTML_Progress/tutorial_B_migration12.pkg.html">Prev</a></td>
<td width="34%" align="center" valign="top"><a href=
"../HTML_Progress/tutorial_part4-appendixes.pkg.html">Up</a></td>
<td width="33%" align="right" valign="top"><a href=
"../HTML_Progress/tutorial_progress.constants.pkg.html">Next</a></td>
</tr>

<tr>
<td width="33%" align="left" valign="top">Appendix B. Migration to version 1.2</td>
<td width="34%" align="center" valign="top">Appendixes</td>
<td width="33%" align="right" valign="top">Package HTML_Progress Constants</td>
</tr>
</table>
        <div class="credit">
		    <hr />
		    Documentation generated on Sun, 12 Sep 2004 20:23:38 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.3.0RC3</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>